import { defineStore } from "pinia";

export const useStore = defineStore({
    id:'user',
    state:()=>({
        webConfig:{
            Skype:'',
            Whatsapp:'',
            beian:'',
            follow_us:'',
            ico:'',
            logo:'',
            title:''
        },
        webMetaName:'',
        webMetaContent:'',
        currentRoute:''
    }),
    actions:{
        uploadWebConfig(val:any){
            this.webConfig.Skype = val.Skype;
            this.webConfig.Whatsapp = val.Whatsapp;
            this.webConfig.beian = val.beian;
            this.webConfig.follow_us = val.follow_us;
            this.webConfig.ico = val.ico;
            this.webConfig.logo = val.logo;
            this.webConfig.title = val.title;
        },
        updateCurrentRoute(val:any){
            this.currentRoute = val
        }
    }
})